package com.zuihai.app.mvp.ui.adapter;

import android.support.annotation.Nullable;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.zuihai.app.R;
import com.zuihai.app.mvp.model.entity.Detail;
import com.zuihai.app.mvp.ui.holder.BaseViewHolderWraper;

import java.util.List;

/**
 * Created by Administrator on 2017/6/21 0021.
 */

public class DetailLabelAdapter extends BaseQuickAdapter<Detail.Label, BaseViewHolderWraper> {

    public DetailLabelAdapter(@Nullable List<Detail.Label> data) {
        super(R.layout.layout_item_detail_label, data);
    }

    @Override
    protected void convert(BaseViewHolderWraper helper, Detail.Label item) {
        if (item.text.length()==0){
            helper.setText(R.id.tv_label, "标签");
        }else {
            helper.setText(R.id.tv_label, item.text);
        }

    }
}
